package com.fortune.dao;

import com.fortune.dto.in.dSpecification.DSpecificationAddDto;
import com.fortune.dto.in.dSpecification.DSpecificationEditDto;
import com.fortune.dto.in.dSpecification.DSpecificationListDto;
import com.fortune.vo.dProduct.DProduceSpecification;
import com.fortune.vo.dSpecification.DSpecification;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DSpecificationDao {

    /**
     * 查询规格码表
     * @param did
     * @param specificationListDto
     * @return
     */
    List<DSpecification> queryDSpecificationList(@Param("did") String did, @Param("specificationListDto") DSpecificationListDto specificationListDto);

    /**
     * 查询规格码表个数
     * @param did
     * @param specificationListDto
     * @return
     */
    int queryDSpecificationListCount(@Param("did") String did, @Param("specificationListDto") DSpecificationListDto specificationListDto);

    /**
     * 添加规格
     * @param did
     * @param specificationAddDto
     */
    int addDSpecification(@Param("did") String did, @Param("specificationAddDto") DSpecificationAddDto specificationAddDto);

    /**
     * 编辑规格
     * @param did
     * @param specificationEditDto
     * @return
     */
    int editDSpecification(@Param("did") String did, @Param("specificationEditDto") DSpecificationEditDto specificationEditDto);

    /**
     * 删除规格
     * @param did
     * @param specificationId
     * @return
     */
    int deleteDSpecification(@Param("did") String did, @Param("specificationId") String specificationId);

    /**
     * 添加时查重
     * @param did
     * @param specificationAddDto
     * @return
     */
    int queryAddDSpecificationExist(@Param("did") String did, @Param("specificationAddDto") DSpecificationAddDto specificationAddDto);

    /**
     * 编辑时查重
     * @param did
     * @param specificationEditDto
     * @return
     */
    int queryEditDSpecificationExist(@Param("did") String did, @Param("specificationEditDto") DSpecificationEditDto specificationEditDto);

    /**
     * 查询规格码表
     * @param did
     * @return
     */
    List<DProduceSpecification> queryProduceDSpecificationList(String did);
}
